home *** CD-ROM | disk | FTP | other *** search
Text File | 1994-01-16 | 2.3 KB | 94 lines | [TEXT/MMCC] |
- /* mmAlertObject */
- /* Copyright © 1994 George R. Cossey */
-
- /* File name: mmAlertObject
- Function: Basic alert object
-
- History: 1/16/94 Original by George Cossey
-
- */
-
- #include "mmCommonMM_Demo.h" /* Common */
- #include "CommonMM_Demo.h" /* Common */
-
-
- /* ======================================================= */
-
- /* Routine: MyFilter */
- /* Purpose: Filter routine, also used for initial setup of dimmed states */
-
- pascal Boolean theAlertFilter(DialogPtr theDialog,EventRecord *theEvent,short *itemHit)
- {
- Boolean FilterValue; /* Temporary return value */
-
-
- FilterValue = false;
- if ((gCurrentAlert != nil) && (!gCurrentAlert->DidFirstTime)) /* Make all controls and do lines and rects */
- {
- gCurrentAlert->theWindow = theDialog;
- gCurrentAlert->DidFirstTime = true; /* Not first time anymore */
- gCurrentAlert->HandleFirstTime();
- }
-
- FilterValue = gCurrentAlert->FilterThisEvent(theDialog,theEvent,itemHit); /* Call the user routine */
-
- CheckKeysInDialog(theDialog,&FilterValue,theEvent,itemHit);
-
- return(FilterValue);
- }
-
- /* ======================================================= */
-
- /* Handle setup necessary for first time in */
-
- void CmmAlert::Init()
- {
-
- inherited::Init();
-
- this->theWindow = nil; /* Window pointer */
- this->DidFirstTime = false; /* Flag for first time thru the filter */
- /* Expected to be overridden by the Alert code */
- }
-
- /* ======================================================= */
-
- void CmmAlert::HandleFirstTime()
- {
- /* Expected to be overridden by the Alert code */
- }
-
- /* ======================================================= */
-
- void CmmAlert::DoFirstTime()
- {
- /* Expected to be overridden by the Alert code */
- }
-
- /* ======================================================= */
-
- Boolean CmmAlert::FilterThisEvent(DialogPtr theDialog,EventRecord *theEvent,short *itemHit)
- {
- Boolean FilterItOut;
- /* Expected to be overridden by the Alert code */
- FilterItOut = false;
- return(FilterItOut);
- }
-
- /* ======================================================= */
-
- void CmmAlert::DoItemHit(short itemHit)
- {
- /* Expected to be overridden by the Alert code */
- }
-
- /* ======================================================= */
-
- void CmmAlert::BringUpAlert()
- {
- /* Expected to be overridden by the Alert code */
- }
-
- /* ======================================================= */
- /* ======================================================= */
-